# Author：wgw
names = ["林从龙","张冰丽","潘丽璇","黄炜","蔡明丽"]
print(names[1],names[2]) #输出名字，不是列表格式

print(names[1:3]) #取左不取右
#从头开始
print(names[0:3])
print(names[:3])
#从后往前
print(names[-3:-1]) #取倒数第三个对象到倒数第二个
print(names[-3:0]) #取倒数第三个到最后一个

#%% 计算个数
a = [1,2,3,4,5,4,3,2,1]
print(a.count(4))


